﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/RopaOnline.Master" AutoEventWireup="true" CodeBehind="UserTypeSearch.aspx.cs" Inherits="Upsam.RopaOnline.Web.UserTypeSearch" %>
<asp:Content ID="cntHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="cntContext" ContentPlaceHolderID="cphContext" runat="server">
    	<div>
		<div style="width: 98%; float: left; border: solid 1px #000; margin-top: 10px;">
			<div style="width: 98%; float: left; margin-top: 10px;">
				<div style="width: 48%; float: left; padding-left: 10px;">
					<asp:Label ID="lblUserTypeName" runat="server" Text="Tipo Usuario" AssociatedControlID="txtUserTypeName"></asp:Label>
				</div>
				<div style="width: 48%; float: left; padding-left: 10px;">
					<asp:TextBox ID="txtUserTypeName" runat="server" Width="98%"></asp:TextBox>
				</div>
			</div>
			<div style="width: 98%; float: left; margin-top: 10px; text-align: center; margin-bottom: 10px;">
				<asp:Button ID="btnSearch" runat="server" Text="Buscar" OnClick="btnSearch_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
				<asp:Button ID="btnAdd" runat="server" Text="Agregar" OnClick="btnAdd_Click" />
			</div>
		</div>
		<div style="width: 98%; float: left; border: solid 1px #000; height: auto; margin-top: 10px;">
			<asp:GridView ID="grvUserType" runat="server" AllowPaging="True" AllowSorting="True"
				AutoGenerateDeleteButton="True" AutoGenerateColumns="False" BackColor="White"
				BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="IdTipoUsuario"
				DataSourceID="ldsUserType" GridLines="Horizontal" OnRowCommand="grvUserType_RowCommand">
				<RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
				<Columns>
					<asp:ButtonField ButtonType="Link" CommandName="EditItem" CausesValidation="false"
						Text="Editar" />
					<asp:BoundField DataField="IdTipoUsuario" HeaderText="IdTipoUsuario" InsertVisible="False"
						ReadOnly="True" HeaderStyle-CssClass="oculto" ItemStyle-CssClass="oculto" />
					<asp:BoundField DataField="Tipo" HeaderText="Tipo Usuario" SortExpression="Tipo" />
				</Columns>
				<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
				<PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
				<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
				<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
				<AlternatingRowStyle BackColor="#F7F7F7" />
			</asp:GridView>
		</div>
	</div>
    <asp:LinqDataSource ID="ldsUserType" runat="server" ContextTypeName="Upsam.RopaOnline.Modelo.Data.RopaOnLineDataContext"
		OrderBy="Tipo" TableName="TipoUsuarios" Where="Tipo.Contains(@Tipo)"
		EnableDelete="true">
		<WhereParameters>
			<asp:ControlParameter ControlID="txtUserTypeName" Name="Tipo" PropertyName="Text"
				Type="string" ConvertEmptyStringToNull="false" />
		</WhereParameters>
	</asp:LinqDataSource>
</asp:Content>
